class BannerItem {
  final int? id;
  final String imageUrl;
  final String description;
  final String websiteUrl;
  final int publisherId;

  BannerItem({
    this.id,
    required this.imageUrl,
    required this.description,
    required this.websiteUrl,
    required this.publisherId,
  });

  factory BannerItem.fromMap(Map<String, dynamic> map) {
    return BannerItem(
      id: map['id'],
      imageUrl: map['imageUrl'],
      description: map['description'],
      websiteUrl: map['websiteUrl'],
      publisherId: map['publisherId'],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'imageUrl': imageUrl,
      'description': description,
      'websiteUrl': websiteUrl,
      'publisherId': publisherId,
    };
  }
}
